<%--
  Created by IntelliJ IDEA.
  User: zhangjie
  Date: 2018/9/21
  Time: 9:18 AM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/component/common.jsp" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="${frames}/css/lib/bootstrap.min.css" type="text/css">
    <link rel="stylesheet" href="${frames}/css/lib/dataTables.bootstrap.css" type="text/css">
    <%--<link rel="stylesheet" href="${frames}/css/paginate.css" type="text/css">--%>
    <%--<link rel="stylesheet" href="${frames}/css/qulitity.css" type="text/css">--%>
    <link rel="stylesheet" href="../assets/css/views/modules/_common.scss">
    <link rel="stylesheet" href="${newframe}/css/base/base.css" type="text/css">
    <link rel="stylesheet" href="${assets}/css/views/bloodScreening.css">
    <link rel="stylesheet" href="${assets}/css/views/department/departmentMgr.css">
    <script src="../assets/js/views/vue.min.js"></script>
    <script src="${js}/jquery-1.9.1.min.js"></script>
    <script src="${js}/jquery.dataTables.js"></script>
    <link href="../assets/css/bootstrap-datetimepicker.css" type="text/css">
    <script src="../assets/js/bootstrap-datetimepicker.min.js"></script>
    <script src="${frames}/Chronic/laydate/laydate.js"></script>
    <script src="${assets}/js/views/bpAbnormal.js"></script>
    <%-- 时间格式化封装 --%>
    <script src="../assets/js/views/dateChange.js"></script>
    <%@ include file="/WEB-INF/jsp/component/commonBottom.jsp" %>
    <script type="text/javascript" src="../assets/js/echarts.js"></script>
    <style>
        .color{
            margin:0 !important;
        }
        span{
            font-weight: normal;
            font-stretch: normal;
            letter-spacing: 0px;
            font-family: PingFang-SC-Regular;
        }
        .illness span{
            height: 16px;
            font-family: PingFang-SC-Regular;
            font-size: 16px;
            font-weight: normal;
            font-stretch: normal;
            letter-spacing: 0px;
            color: #666666;
        }
        .btn{
            float:right ;
            width:100px;
            font-size:16px;
            line-height:28px;
            background:#35acfd !important;
            margin-right:15px !important;
            padding:0 !important;
        }
        .title{
            font-family: MicrosoftYaHei;
            font-size: 16px !important;
            font-weight: normal;
            font-stretch: normal;
            letter-spacing: 0.3px;
            color: #666666;
        }
        label{
            height: 16px;
            font-family: PingFang-SC-Regular;
            font-size: 16px;
            font-weight: normal;
            font-stretch: normal;
            letter-spacing: 0px;
            color: #666666;
        }
        /* 随访时间及方式 */
        .way,illness,sign,live,evaluate{
            margin-bottom:30px;
        }
        .way_content,illness_content{
            width:100%;
            margin-left:15px;
            margin-top:19px;
        }
        .way_content label{
            width:90px;
        }
        .way_content input,#accompanyType{
            width: 181px;
            line-height: 30px;
            height:30px;
            border: solid 1px #d0d0d0;
            font-family: MicrosoftYaHei;
            font-size: 15px;
            font-weight: normal;
            font-stretch: normal;
            letter-spacing: 0px;
            color: #333333;
            text-indent:10px !important;
        }
        /* 病症 */
        .illness_content{
            margin-left:15px;
            margin-bottom:20px;
        }
        .illness_content label{
            margin-left:22px;
        }
        input[type=checkbox] {
            width:20px;
            height:20px;
            -webkit-appearance: none;
            border-radius:5px;
            border:1px solid #9e9e9e;
            vertical-align:top;
            margin-top:7px;
            display:inline-block !important;
        }
        input[type=checkbox]:checked{
            background-image: url('../assets/images/radio.png');
            background-size:100% 100%;
            border:none
        }
        .ill1{
            margin-right:22px;
            margin-top:20px;
        }
        /* 体征 */
        .sign_content{
            margin-left:15px;
            margin-top:20px;
            margin-bottom:20px;
        }
        .sign_content div input{
            width:180px;
            line-height: 30px;
            border: solid 1px #d0d0d0;
            text-indent:10px;
            position:absolute;
            height:30px;
            display:inline-block;
            margin-left:10px;
        }
        .sign_content div span{
            position:relative;
            left:130px;
        }
        .sign_content div{
            display:inline-block;
            width:270px;
        }
        .second div input{
             width:115px;
         }
        .second div span{
            left:80px;
        }
        .second div{
            width:200px;
        }
        .third div input{
            width:115px;
        }
        .third div span{
            left:80px;
        }
        .third div{
            width:200px;
        }
        /* 生活方式调查 */
        .live_content{
            margin-left:15px;
            margin-top:20px;
        }
        .live_content span{
            font-family: PingFang-SC-Regular;
            font-size: 16px;
            font-weight: normal;
            font-stretch: normal;
            letter-spacing: 0px;
            color: #666666;
            margin-right:19px;
            display:inline-block;
        }
        .live_content input{
            width: 115px;
            height: 30px;
            border: solid 1px #d0d0d0;
            line-height:30px;
            margin-right:10px;
            text-indent:10px;
        }
        .live_content div{
            margin-top:20px;
        }
        .sprots span{
            margin-right:65px;
        }
        #salt{
            width: 181px;
            height: 30px;
            border: solid 1px #d0d0d0;
            font-family: MicrosoftYaHei;
            font-size: 15px;
            font-weight: normal;
            font-stretch: normal;
            line-height: 30px;
            letter-spacing: 0px;
            color: #333333;
            text-indent:10px;
            margin-right:19px;
        }
        .salt input{
            width: 180px;
            height: 30px;
            border: solid 1px #d0d0d0;
            line-height:30px;
            margin-right:10px;
            text-indent:10px;
        }
        .mentality{
            margin-bottom:20px;
        }
        select{
            width: 181px;
            height: 30px;
            border: solid 1px #d0d0d0;
            font-family: MicrosoftYaHei;
            font-size: 15px;
            font-weight: normal;
            font-stretch: normal;
            line-height: 30px;
            letter-spacing: 0px;
            color: #333333;
            text-indent:10px;
            margin-right:19px;
        }
        .salttype{
            width: 200px;
            height: 30px;
        }
        /* 随访评估 */
        .evaluate_content{
            margin-left:15px;
            margin-bottom:20px;
            margin-top:20px;
        }
        .evaluate_content span{
            font-family: PingFang-SC-Regular;
            font-size: 16px;
            font-weight: normal;
            font-stretch: normal;
            letter-spacing: 0px;
            color: #666666;
            margin-right:19px;
            display:inline-block;
        }
        /* 治疗建议 */
        .suggest_content{
            margin-left:15px;
            margin-bottom:20px;
            margin-top:20px;
        }
        .suggest_content span{
            font-family: PingFang-SC-Regular;
            font-size: 16px;
            font-weight: normal;
            font-stretch: normal;
            letter-spacing: 0px;
            color: #666666;
            margin-right:19px;
            display:inline-block;
        }
        .suggest_content textarea{
            width: 500px;
            height: 120px;
            border: solid 1px #d0d0d0;
            vertical-align:top
        }
        /*  表格 */
        #example th{
            height: 30px;
            background-color: #e6e6e6;
            font-family: MicrosoftYaHei;
            font-size: 16px;
            font-weight: normal;
            font-stretch: normal;
            line-height: 30px;
            letter-spacing: 0px;
            color: #666666;
        }
        #example td{
            text-align:center;
            height: 17px;
            font-family: MicrosoftYaHei;
            font-size: 16px;
            font-weight: normal;
            font-stretch: normal;
            line-height: 30px;
            letter-spacing: 0px;
            color: #333333;
        }
        #mytool{
            width:96%;
        }
        #example_paginate{
            margin-top:15px;
            width:100%;
            text-align: center;
            margin-bottom:40px;
        }
        button{
            margin-top:0px !important;
        }
        .btn{
            font-family: MicrosoftYaHei;
            font-size: 16px;
            font-weight: normal;
            font-stretch: normal;
            letter-spacing: 0.3px;
            color: #ffffff;
        }
        textarea{
            font-family: MicrosoftYaHei;
            font-size: 16px;
            font-weight: normal;
            font-stretch: normal;
            line-height: 30px;
            letter-spacing: 0px;
            color: #333333;
            text-indent:10px;
        }
        input{
            text-indent:10px;
            font-family: MicrosoftYaHei;
            font-size: 16px;
            font-weight: normal;
            font-stretch: normal;
            line-height: 30px;
            letter-spacing: 0px;
            color: #333333;
        }
        .content{
            height:auto !important;
        }
        .illness{
            box-shadow:none !important
        }
        .dataTables_empty{
            line-height:30px;
        }
        .default{
            border:1px solid red !important;
        }
        .title{
            line-height:30px;
            margin-bottom: 5px;
            font-size:16px;
            color:#666666;
            margin-left:10px;
        }
    </style>
</head>
<body>
    <div>
        <%@ include file="../../breadline.jsp" %>
    </div>
    <div id="main" class="wrap">
        <div>
            <%@ include file="../../personalnews.jsp" %>
        </div>
        <div class="illness" style="width:99%; margin-right:19px;">
            <div class="tableWrap" style="padding-bottom:20px;background-color: #ffffff;box-shadow: 0 3px 7px 0 rgba(0, 0, 0, 0.05);">
                <div style="margin-left:20px;padding-top:20px;">
                    <h3 style="margin-bottom:16px;">随访信息</h3>
                </div>
                <div style="margin-left:19px;margin-bottom:10px;">
                    <div class="test" style="border-bottom:1px solid #e6e6e6;">
                        <div style="width:100%;overflow:hidden;margin-bottom:10px;">
                            <span style="margin-right:10px;width:5px;padding-bottom:25px;background-color:#35acfd;display:inline-block;vertical-align:middle"></span>
                            <span class="title">血压趋势</span>
                            <button type="button" class="btn btn-info" @click="Morebp()" v-show="xyqs">更多</button>
                        </div>
                        <div class="mainbar">

                        </div>
                        <p v-show="!mainbar" style="text-align:center;margin:30px 0;">暂无数据</p>
                    </div>
                </div>
                <div style="margin-left:19px;">
                    <div class="way">
                        <span style="width:5px;padding-bottom:25px;background-color:#35acfd;display:inline-block;vertical-align:middle;margin-right:10px;"></span>
                        <span class="title">随访时间及方式</span>
                        <button type="button" class="btn btn-info" @click="pressure()">
                            <img src="../assets/images/revise.png" alt="" style="width:16px;vertical-align: middle;">  保存
                        </button>
                        <div class="way_content">
                            <div>
                                <label for="">随访日期：</label>
                                <%-- 日期选择器 --%>
                                <div id="PrevTime" class="input-group date form_date" data-date-format="yyyy-mm-dd" style="display:inline-block !important">
                                    <input v-model="accompanyTime" id="beginDate" type="text" class="lay-date" readonly >
                                </div>
                                <label for="" style="margin-left:40px;">随访方式：</label>
                                <%-- 随访方式 下拉 --%>
                                <select id="accompanyType" name="accompanyType" class="SN">
                                    <medi:configOpt name="accompanyType"/>
                                </select>
                            </div>
                            <div style="margin-top:25px;">
                                <%--<label for="">随访医生：</label>--%>
                                <%--&lt;%&ndash; 随访医生 可输入 &ndash;%&gt;--%>
                                <%--<input type="text" placeholder="请输入医生名称" class="doctorId" :value="bpDate.doctorName">--%>
                                <label for="" style="">下次随访：</label>
                                <%-- 下次随访时间 时间选择器 --%>
                                <div id="PrevTime" class="input-group date form_date" data-date-format="yyyy-mm-dd" style="display:inline-block !important">
                                    <input v-model="nextAccompanyTime" id="nextDate" type="text" class="lay-date"  readonly >
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="illness">
                        <span style="width:5px;padding-bottom:25px;background-color:#35acfd;display:inline-block;vertical-align:middle;margin-right:10px;"></span>
                        <span class="title">病症</span>
                        <div class="illness_content">
                            <span style="margin-right:26px;margin-top:20px;" class="title">病症选择</span>
                            <div style="display:inline-block;vertical-align: top;width:80%;">
                                <span class="ill1">
                                    <input type="checkbox" value="" id="q1"/>
                                    <label for="q1">无症状</label>
                                </span>
                                <span class="ill1">
                                    <input type="checkbox" value="" id="q2" />
                                    <label for="q2">头疼头晕</label>
                                </span>
                                <span class="ill1">
                                    <input type="checkbox" value="" id="q3" />
                                    <label for="q3">恶心呕吐</label>
                                </span>
                                <span class="ill1">
                                    <input type="checkbox" value="" id="q4"  />
                                    <label for="q4">眼花耳鸣</label>
                                </span>
                                <span class="ill1">
                                    <input type="checkbox" value="" id="q5" />
                                    <label for="q5">呼吸困难</label>
                                </span>
                                <span class="ill1">
                                    <input type="checkbox" value="" id="q6"  />
                                    <label for="q6">心悸胸闷</label>
                                </span>
                                <span class="ill1">
                                    <input type="checkbox" value="" id="q7" />
                                    <label for="q7">鼻子出血不止</label>
                                </span>
                                <span class="ill1">
                                    <input type="checkbox" value="" id="q8" />
                                    <label for="q8">四肢发麻</label>
                                </span>
                                <span class="ill1" style="width:25% !important;">
                                    <input type="checkbox" value="" id="q9"  />
                                    <label for="q9">下肢水肿</label>
                                </span>
                            </div>
                        </div>
                        <div class="illness_content">
                            <span style="margin-right:60px;margin-top:20px;" class="title">其他</span>
                            <input type="text" style="width: 40%;line-height: 30px;border: solid 1px #d0d0d0;" class="illness_other" v-model="bpDate.otherSymptom">
                        </div>
                    </div>
                    <div class="sign">
                        <span style="width:5px;padding-bottom:25px;background-color:#35acfd;display:inline-block;vertical-align:middle;margin-right:10px;"></span>
                        <span class="title">体征</span>
                        <div class="sign_content">
                             <div>
                                 <label for="">收缩压：</label>
                                 <input type="text" class="lowPressure" v-model="bpDate.lowPressure">
                                 <span>mmHg</span>
                             </div>
                            <div>
                                <label for="">舒张压：</label>
                                <input type="text" class="highPressure" v-model="bpDate.highPressure">
                                <span>mmHg</span>
                            </div>
                            <div>
                                <label for="">身高</label>
                                <input type="text" class="height" v-model="bpDate.height">
                                <span style="left:160px;">cm</span>
                            </div>
                        </div>
                        <div class="sign_content second">
                            <div>
                                <label for="">体重：</label>
                                <input type="text" class="weight" v-model="bpDate.weight">
                                <span style="left:100px;">kg</span>
                            </div>
                            <div>
                                <label for="">指导：</label>
                                <input type="text" class="weightGuide" v-model="bpDate.weightGuide">
                                <span style="left:100px;">kg</span>
                            </div>
                            <div style="width:220px;">
                                <label for="">体脂指数：</label>
                                <input type="text" class="bmi" v-model="bpDate.bmi">
                                <span>kg/m²</span>
                            </div>
                            <div>
                                <label for="">指导：</label>
                                <input type="text" class="bmiGuide" v-model="bpDate.bmiGuide">
                                <span>kg/m²</span>
                            </div>
                        </div>
                        <div class="sign_content third">
                            <div>
                                <label for="">腰围：</label>
                                <input type="text" class="waist" v-model="bpDate.waist">
                                <span style="left:100px;">cm</span>
                            </div>
                            <div>
                                <label for="">指导：</label>
                                <input type="text" class="waistGuide" v-model="bpDate.waistGuide">
                                <span style="left:100px;">cm</span>
                            </div>
                            <div style="width:220px;">
                                <label for="">心率：</label>
                                <input type="text" style="width:180px;" class="heartRate" v-model="bpDate.heartRate">
                                <span style="left:140px;">次/分</span>
                            </div>
                        </div>
                        <div class="sign_content">
                            <label style="margin-right:60px;">其他</label>
                            <input type="text" style="width: 40%;line-height: 30px;border: solid 1px #d0d0d0;" class="otherPathological" v-model="bpDate.otherPathological">
                        </div>
                    </div>
                    <div class="live">
                        <span style="width:5px;padding-bottom:25px;background-color:#35acfd;display:inline-block;vertical-align:middle;margin-right:10px;"></span>
                        <span class="title">生活方式调查与指导</span>
                        <div class="live_content">
                            <div class="first" >
                                <span>日吸烟量（支）</span>
                                <label for="">目前情况：</label>
                                <input type="text" class="smoke" :value="bpDate.smoke">
                                <label for="">指导：</label>
                                <input type="text" class="smokeGuide" :value="bpDate.smokeGuide">
                            </div>
                            <div class="first" >
                                <span>日饮酒量（两）</span>
                                <label for="">目前情况：</label>
                                <input type="text" class="drink" :value="bpDate.drink">
                                <label for="">指导：</label>
                                <input type="text" class="drinkGuide" :value="bpDate.drinkGuide">
                            </div>
                            <div class="sprots" style="margin-top:5px;">
                                <span>运动情况</span>
                                <label for="">目前情况：</label>
                                <div style="display:inline-block;width:130px;">
                                    <input type="text" value="0" style="position:absolute" class="sportsTimes" :value="bpDate.sportsTimes">
                                    <span style="position:relative;left:75px;">次/周</span>
                                </div>
                                <div style="display:inline-block;width:140px;">
                                    <input type="text" value="0" style="position:absolute" class="sportsTime" :value="bpDate.sportsTime">
                                    <span style="position:relative;left:62px;">分钟/次</span>
                                </div>
                                <label for="">指导：</label>
                                <div style="display:inline-block;width:140px;">
                                    <input type="text" value="0" style="position:absolute" class="sportsTimesGuide" :value="bpDate.sportsTimesGuide">
                                    <span style="position:relative;left:75px;">次/周</span>
                                </div>
                                <div style="display:inline-block;width:140px;">
                                    <input type="text" value="0" style="position:absolute" class="sportsTimeGuide" :value="bpDate.sportsTimeGuide">
                                    <span style="position:relative;left:62px;">分钟/次</span>
                                </div>
                            </div>
                            <div class="salt" style="margin-top:0px;">
                                <span>摄盐程度</span>
                                <div class="salts salttype" style="display:inline-block">
                                    <select name="salt" class="SN" >
                                        <medi:configOpt name="salt"/>
                                    </select>
                                </div>
                                <span>指导</span>
                                <div class="saltGuide salttype" style="display:inline-block">
                                    <select name="salt" class="SN" >
                                        <medi:configOpt name="salt"/>
                                    </select>
                                </div>
                                <span>辅助检查</span>
                                <input type="text" class="assistCheck" v-model="bpDate.assistCheck">
                            </div>
                            <div class="mentality">
                                <span>心理调整</span>
                                <select id="psychology" name="psychology" class="SN">
                                    <medi:configOpt name="psychology"/>
                                </select>
                                <span>遵医行为</span>
                                <select id="observe" name="observe" class="SN">
                                    <medi:configOpt name="observe"/>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="evaluate">
                        <span style="width:5px;padding-bottom:25px;background-color:#35acfd;display:inline-block;vertical-align:middle;margin-right:10px;"></span>
                        <span class="title">随访评估</span>
                        <div class="evaluate_content">
                            <span>此次随访分类</span>
                            <select id="accompanyClassify" name="accompanyClassify" class="SN">
                                <medi:configOpt name="accompanyClassify"/>
                            </select>
                        </div>
                    </div>
                    <div class="suggest">
                        <span style="width:5px;padding-bottom:25px;background-color:#35acfd;display:inline-block;vertical-align:middle;margin-right:10px;"></span>
                        <span class="title">生活方式调查与指导</span>
                        <div class="suggest_content">
                            <span>医生建议</span>
                            <textarea name="suggest" id="" cols="30" rows="10" class="advise">{{bpDate.advise}}</textarea>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div style="width:99%; margin-right:19px;margin-top:20px;" class="content">
            <div style="padding-bottom:20px;background-color: #ffffff;box-shadow: 0 3px 7px 0 rgba(0, 0, 0, 0.05);">
                <div style="margin-left:19px;">
                    <div class="first_news">
                        <div class="news" style="margin-top:15px;margin-bottom:16px;">
                            <h3>用药信息</h3>
                            <button type="button" class="btn btn-info" @click="deletMedical()" v-show="!slide" style="margin-top:20px;">删除</button>
                            <button type="button" class="btn btn-info" @click="updateMedical()" style="margin-right:20px;margin-top:20px;">
                                修改
                            </button>
                            <button v-show="!slide" type="button" class="btn btn-info" @click="addMedical()" style="margin-right:20px;margin-top:20px;" >
                               新增
                            </button>
                        </div>
                        <div id="tablepart">
                            <table id="example" class="display" cellspacing="10" width="99%">
                                <thead>
                                    <tr>
                                        <th style="width:25px;">&nbsp;</th>
                                        <th style="width:90px;">序号</th>
                                        <th style="display:1%;"></th>
                                        <th>药名</th>
                                        <th style="width:15%;">数量（剂量）</th>
                                        <th>规格</th>
                                        <th>频度（次數）</th>
                                        <th>用法</th>
                                        <th>开立医生</th>
                                        <th>开立时间</th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        var vm = new Vue({
            el : "#main",
            data: {
                infor: [],//病人基本信息data
                idCard:'',
                id:'',
                add:false,
                way:'',
                diseasesType:'',
                slide:false,
                beginDate:'',
                nextDate:'',
                bpDate:{
                    otherSymptom:'',
                    advise:'',
                    assistCheck:'',
                    bloodFat:'',
                    highCholesterol:'',
                    lowCholesterol:'',
                    cholesterol:'',
                    triglyceride:'',
                    bloodSugar:'',
                    lowPressure:'',
                    highPressure:'',
                    heartRate:'',
                    bmi:'',
                    waist:'',
                    weight:'',
                    height:''
                },
                accompanyTime:'',
                nextAccompanyTime:'',
                synchronous:false,
                btnText:'',
                dis:false,
                mainbar:true,
                Type:'',
                BpInfo:{
                    firstjson:[],
                    secondjson:[],
                    data:[]
                },
                xyqs:true
            },
            methods:{
                //修改病人基本信息
                addDevice : function (){
                    let that= this;
                    window.parent.showNewModelIframe("${URL_PATIENT_PATIENT}?id="+that.infor.id+'&diseasesType='+that.diseasesType,800,650);
                },
                Morebp:function(){
                    let that = this;
                    // 显示更多血压信息 跳转
                    $.ajax({
                        url:"${URL_SCREENING_GETBREADLINE}",
                        dataType:'json',
                        type:'post',
                        success:function(data){
                            breadLine = JSON.parse(data.data)
                            var url = '${URL_PATIENT_TOMOREBPINFO}?idCard=' + that.infor.idcard+'&type='+that.Type
                            breadLine.push({
                                name:'血压信息',
                                href:url
                            })
                            $.ajax({
                                url:'${URL_SCREENING_SAVEBREADLINE}',
                                data:{
                                    breadLine:JSON.stringify(breadLine)
                                },
                                dataType:'json',
                                type:'post',
                                success:function(data){
                                    parent.showSrc('${URL_PATIENT_TOMOREBPINFO}?idCard=' + that.infor.idcard+'&type='+that.Type)
                                }
                            })
                        }
                    })
                },
                // 创建table表格
                initTable : function (){
                    let that = this;
                    var idCard = '${URL_PATIENT_MEDICALINFO}?idCard='+ that.idCard
                    table = $('#example').DataTable({
                        "dom": "<'row'<'#mytool.col-xs-10'><'col-xs-6'f>r>" +
                        "t" +
                        "<'row'<''i><''p>>",
                        "bFilter": false,//去掉搜索框
                        "bAutoWidth": true, //自适应宽度
                        "info": false,
                        "bSort": false,
                        "sPaginationType" : "full_numbers",
                        "ordering": false,//是否允许Datatables开启排序
                        "bProcessing" : true,
                        "bServerSide" : true,
                        "searching" : false, //去掉搜索框方法一
                        'lengthChange' : false,
                        "oPaginate":false,
                        "lengthMenu": [10],
                        "sAjaxSource":idCard,
                        "sAjaxDataProp": "list",//查询后，返回的集合
                        "fnServerData": function ( sSource, aoData, fnCallback ) {  //查询条件
                            $.ajax( {
                                "dataType": 'json',
                                "url": sSource,
                                "type":'post',
                                "data": aoData,
                                "success": function(resp){
                                    fnCallback(resp.data)
                                }
                            } );
                        },
                        "aoColumns" : [{
                            "targets": 0,
                            "data": null,
                            "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
                                $(nTd).html('<input class="all_id" type="checkbox">'+'<span style="display:none;">'+ oData.type +'</span>')
                            }

                        },{
                            "targets": 1,
                            "data": null,
                            "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
                                $(nTd).text(oData.id)
                                $(nTd).attr('title',oData.id)
                            }
                        },{
                            "targets": 2,
                            "data": null,
                            "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
                                $(nTd).html('<span style="display:none">'+oData.useType+'</span>')
                            }
                        },{
                            "targets": 3,
                            "data": null,
                            "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
                                $(nTd).text(oData.medicalName)
                                $(nTd).attr('title',oData.medicalId)
                            }
                        },{
                            "mDataProp" : "numbers"
                        },{
                            "mDataProp" : "medicalSpecs"
                        },{
                            "mDataProp" : "medicalFrequency"
                        },{
                            "targets": 7,
                            "data": null,
                            "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
                                var doctor;
                                if( oData.useType == 0 ){
                                    doctor = `<span title="0">其他</span>`
                                }else if( oData.useType == 1 ){
                                    doctor = `<span title="1">口服</span>`
                                }else if( oData.useType == 2 ){
                                    doctor = `<span title="2">皮下注射</span>`
                                }else{
                                    doctor = '<span title=""></span>'
                                }
                                $(nTd).html(doctor)
                            }
                        },{
                            "targets": 8,
                            "data": null,
                            "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
                                var doctor;
                                if( oData.doctorName == null ){
                                    doctor = ""
                                }else{
                                    doctor = oData.doctorName
                                }
                                $(nTd).text(doctor)
                            }
                        },{
                            "targets": 9,
                            "data": null,
                            "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
                                if( oData.recordTime != null ){
                                    oData.recordTime = oData.recordTime.slice(0,10)
                                }else{
                                    oData.recordTime = ''
                                }
                                $(nTd).text(oData.recordTime)
                            }
                        }],
                        "oLanguage": {//插件的汉化
                            "sLengthMenu": "32",
                            "sZeroRecords" : "抱歉， 没有找到",
                            "sInfoEmpty" : "没有数据",
                            "sInfoFiltered" : "(从 _MAX_ 条数据中检索)",
                            "oPaginate" : {
                                "sFirst" : "",
                                "sPrevious" : "<b>上一页<b>",
                                "sLast" : "",
                                "sNext" : "<i>下一页</i>"

                            },
                            "sZeroRecords" : "没有检索到数据",
                            "sProcessing" : "<img src='' />",
                            "sSearch" : "搜索"
                        }
                    } )
                },
                addMedical:function(){
                    let that = this;
                    // 新增用药信息页面 跳转
                    // 获取病人id
                    window.parent.showNewModelIframe('${URL_PATIENT_TOADDMEDICAL}?id='+that.infor.id + '&idCard=' + that.infor.idcard+'&diseasesType='+that.diseasesType,680,600);
                },
                Synchronous(e){
                    let that = this
                    $.ajax({
                        url:'${URL_PATIENT_UPDATEPATIENT}',
                        data:{
                            id:that.infor.id,
                            synchronization:'1'
                        },
                        type:'post',
                        dataType:'json',
                        success:function(data){
                            console.log(data)
                            if(data.success){
                                e.target.disabled = true;
                                e.target.innerText = '正在同步'
                                that.setTime()
                            }else{
                                window.parent.showNewModelIframe('${URL_COMMON_TOTIPS}?title='+data.msg,300,200)
                            }
                        }
                    })
                },
                setTime(){
                    let that = this
                    setInterval(function(){
                        $.ajax({
                            url:'${URL_PATIENT_UPDATEPATIENT}',
                            data:{
                                id:that.infor.id,
                                synchronization:'1'
                            },
                            type:'post',
                            dataType:'json',
                            success:function(data){

                            }
                        })
                    },10000)
                },
                updateMedical(){
                    // 判断是否选中
                    let that = this;
                    var checkedArray = []
                    var input = $('.all_id')
                    for( var a = 0; a < input.length; a++ ){
                        if( input[a].checked ){
                            checkedArray.push(input[a])
                        }
                    }
                    if( checkedArray.length != 1 ){
                        var str = '请勾选一条数据修改'
                        window.parent.showNewModelIframe('${URL_COMMON_TOTIPS}?title='+ encodeURI(encodeURI(str)),380,220)
                        return
                    }else{
                        var td = checkedArray[0].parentNode.parentNode.childNodes
                        console.log(td)
                        var medicalFrequency = encodeURI(td[6].innerText)
                        var medicalSpecs = encodeURI(td[5].innerText)
                        var numbers = td[4].innerText
                        var id = td[1].title
                        var userType = td[7].children[0].getAttribute('title')
                        console.log(td[7])
                        var medicalId = td[3].title
                        var medicalname = encodeURI(td[3].innerText)
                        var recordTime = td[8].innerText
                        window.parent.showNewModelIframe('${URL_PATIENT_TOUPDATEMEDICAL}?id=' + id
                            + '&medicalId=' + medicalId + '&idCard=' + that.idCard + '&medicalFrequency=' + medicalFrequency +
                            '&numbers=' + numbers + '&medicalname=' + medicalname + '&diseasesType='+that.diseasesType+
                            '&recordTime='+recordTime+'&medicalSpecs='+medicalSpecs+'&userType='+userType,800,650);
                    }
                },
                deletMedical(){
                    let that = this;
                    var checkedArray = []
                    var input = $('.all_id')
                    for( var a = 0; a < input.length; a++ ){
                        if( input[a].checked ){
                            checkedArray.push(input[a])
                        }
                    }
                    if( checkedArray.length != 1 ){
                        var str = '请勾选一条数据修改'
                        window.parent.showNewModelIframe('${URL_COMMON_TOTIPS}?title='+ encodeURI(encodeURI(str)),380,220)
                    }else{
                        let type = checkedArray[0].parentNode.childNodes[1].innerText
                        var td = checkedArray[0].parentNode.parentNode.childNodes
                        var id = td[2].firstChild.innerText;
                        if( type != 1 ){
                            window.parent.showNewModelIframe('${URL_COMMON_TOTIPS}?title='+'该记录由医院同步,不能进行操作',300,200)
                            return
                        }
                        $.ajax({
                            url:"${URL_PATIENT_DELETEMEDICALINFO}",
                            dataType:'json',
                            type:'post',
                            data:{
                                ids : id
                            },
                            success:function(data){
                                refreshTable();
                            }
                        })
                    }
                },
                pressure(){
                    let that = this
                    // 病症
                    var ills = $('.ill1 input')
                    var symptom = []
                    for( var a = 0 ; a < ills.length; a++ ){
                        if( ills[a].checked ){
                            symptom.push(a+1)
                        }
                    }
                    symptom = symptom.join(',')
                    var app = []
                    if( $('#beginDate').val() === "" || $('#nextDate').val() === "" || $('#accompanyType option:selected').attr('value') === "" ){
                        if( $('#beginDate').val() === "" ){
                            $('#beginDate').addClass('default')
                            app.push($('#beginDate'))
                        }else{
                            if( $('#beginDate').hasClass('default')){
                                $('#beginDate').removeClass('default')
                            }
                        }
                        if( $('#nextDate').val() === "" ){
                            $('#nextDate').addClass('default')
                            app.push($('#nextDate'))
                        }else{
                            if( $('#nextDate').hasClass('default')){
                                $('#nextDate').removeClass('default')
                            }
                        }
                        if( $('#accompanyType option:selected').attr('value') === "" ){
                            $('#accompanyType').addClass('default')
                            app.push($('#accompanyType'))
                        }else{
                            if( $('#accompanyType').hasClass('default')){
                                $('#accompanyType').removeClass('default')
                            }
                        }
                        if(app[0]){
                            var offset = $(app[0]).offset().top
                            parent.$("html,body").animate({ scrollTop: offset}, 0);
                        }
                    }else{
                        $.ajax({
                            url:'${URL_ACCOMPANY_SAVEBP}',
                            dataType:'json',
                            type:'post',
                            data :{
                                // 获取信息数据
                                // 随访时间及方式数据
                                id:that.bpDate.id,
                                symptom:symptom,
                                // 随访日期
                                accompanyTime : $('#beginDate').val(),
                                // 下次随访时间
                                nextAccompanyTime : $('#nextDate').val(),
                                // 随访方式
                                accompanyType : $('#accompanyType option:selected')[0].value,
                                otherSymptom : $('.illness_other').val(),
                                // 体征
                                highPressure : $('.highPressure').val(),
                                // 低压
                                lowPressure : $('.lowPressure').val(),
                                // 身高
                                height : $('.height').val(),
                                // 体重
                                weight : $('.weight').val(),
                                // 体重指导
                                weightGuide : $('.weightGuide').val(),
                                // 体脂
                                bmi : $('.bmi').val(),
                                // 腰围
                                waist : $('.waist').val(),
                                // 腰围指导
                                waistGuide : $('.waistGuide').val(),
                                // 体制指导
                                bmiGuide : $('.bmiGuide').val(),
                                // 心率
                                heartRate : $('.heartRate').val(),
                                // 其他体征
                                otherPathological : $('.otherPathological').val(),
                                // 吸烟量
                                smoke : $('.smoke').val(),
                                // 吸烟量指导
                                smokeGuide : $('.smokeGuide').val(),
                                // 饮酒量
                                drink : $('.drink').val(),
                                // 饮酒量指导
                                drinkGuide : $('.drinkGuide').val(),
                                // 运动次数
                                sportsTimes : $('.sportsTimes').val(),
                                // 运动时间
                                sportsTime : $('.sportsTime').val(),
                                // 运动次数指导
                                sportsTimesGuide : $('.sportsTimesGuide').val(),
                                // 运动时间指导
                                sportsTimeGuide : $('.sportsTimeGuide').val(),
                                // 辅助检查
                                assistCheck : $('.assistCheck').val(),
                                // 治疗建议
                                advise : $('.advise').val(),
                                // 摄盐情况
                                salt : $('.salts select option:selected')[0].value,
                                // 摄盐指导
                                saltGuide : $('.saltGuide select option:selected')[0].value,
                                // 心理调整
                                psychology : $('#psychology option:selected')[0].value,
                                // 遵医行为
                                observe : $('#observe option:selected')[0].value,
                                // 随访分类
                                classify : $('#accompanyClassify option:selected')[0].value,
                                idCard : that.idCard
                            },
                            success:function(data){
                                if( data.success ){
                                    if( data.success ){
                                        $.ajax({
                                            url:"${URL_SCREENING_GETBREADLINE}",
                                            dataType:'json',
                                            type:'post',
                                            success:function(data){
                                                breadLine = JSON.parse(data.data)
                                                var url = '${URL_ACCOMPANY_BPACCOMPANYS}?idcard=' + that.idCard + '&id=' + that.id +'&diseasesType='+ that.diseasesType
                                                breadLine = breadLine.slice(0,breadLine.length-1)
                                                $.ajax({
                                                    url:'${URL_SCREENING_SAVEBREADLINE}',
                                                    data:{
                                                        breadLine:JSON.stringify(breadLine)
                                                    },
                                                    dataType:'json',
                                                    type:'post',
                                                    success:function(data){
                                                        parent.showSrc('${URL_ACCOMPANY_BPACCOMPANYS}?idcard=' + that.idCard + '&id=' + that.id +'&diseasesType='+ that.diseasesType)
                                                    }
                                                })
                                            }
                                        })
                                    }

                                }
                            }
                        })
                    }
                }
            },
            mounted() {
                let that = this;
                var href = location.search.split('?')[1];
                that.idCard = href.split('&')[0].split('=')[1];
                $.ajax({
                    url:"${URL_PATIENT_BPINFO}",
                    type:"post",
                    dataType:"json",
                    data:{
                        idCard:that.idCard
                    },
                    success:function(data){
                        // 判断数据是否有值
                        if( data.data.bpList == null ){
                            that.mainbar = false;
                            that.xyqs = false
                        }else{
                            that.xyqs = true
                            // 动态插入 echart 节点
                            var str = $("<div></div>")
                            // 设置ID
                            $(str).attr('id','mainBar');
                            // 插入节点
                            $(".mainbar").append(str)
                            // 设置样式
                            $("#mainBar").css({
                                'width':"97%",
                                "height": "320px"
                            })
                            var dataJosn;
                            if( data.data.bpList.length > 21 ){
                                dataJosn = data.data.bpList.slice(0,21).reverse()
                            }else{
                                dataJosn = data.data.bpList.reverse()
                            }
                            // 获取对应数据 渲染页面
                            // 显示echart曲线图
                            that.mainbar = true;
                            // 获取对应的数据值
                            for( var a = 0 ; a < dataJosn.length ; a++ ){
                                // 判断 分别获取对应数据
                                // 获取收缩压数据
                                if( dataJosn[a].testItemCode === '104001' ){
                                    that.BpInfo.firstjson.push(dataJosn[a].testValue);
                                    // 获取检测时间 格式为 XX-YY
                                    that.BpInfo.data.push(dataJosn[a].testTime);
                                }
                                // 获取舒张压数据
                                if( dataJosn[a].testItemCode === '104002' ){
                                    that.BpInfo.secondjson.push(dataJosn[a].testValue);
                                }
                            }
                            console.log(that.BpInfo)
                            //基于准备好的dom,初始化echart图表
                            var myChart = echarts.init(document.getElementById('mainBar'))
                            var options = {
                                'title' : {
                                    'text':'血压(mmHg)',
                                    'textStyle':{
                                        'color':'#b0b0b0',
                                        'fontStyle':'normal',
                                        'fontWeight':'lignter',
                                        'fontSize':25
                                    }
                                },
                                'tooltip' : {
                                    'trigger': 'axis',
                                    'formatter' : function (params) {
                                        var str = ''
                                        for( var i = 0; i < params.length; i++ ){
                                            if( params.length === '0' ){
                                                str += ""
                                            }else{
                                                str += params[i].marker+params[i].seriesName+":"+params[i].data+"<br>"
                                            }
                                        }
                                        if( params.length === '0' ){
                                            str += ""
                                        }else{
                                            params.push({
                                                time : params[0].axisValue
                                            })
                                            str += '检查时间' + ':' + params[params.length-1].time
                                        }
                                        return str
                                    }
                                },
                                'calculable' : true,
                                'grid':{
                                    'left':'2%',
                                    'right':'7%',
                                    'top':'10%',
                                    'bottom':'5%',
                                    'containLabel':true,
                                    'y2':50,
                                    'borderWidth':'0'
                                },
                                'xAxis' : [{
                                    'type':'category',
                                    'boundaryGap' : true,
                                    'axisLabel':{'interval': 0},
                                    'data':that.BpInfo.data,
                                    'splitNumber':7,
                                    'axisLabel':{
                                        'intreval':'auto',
                                        'textStyle':{
                                            'color':'black',
                                            'fontSize':'14'
                                        },
                                        'formatter':function(value){
                                            return value.slice(0,10)
                                        }
                                    },
                                    'splitLine':{
                                        'show':false
                                    },
                                    'axisLine':{
                                        'lineStyle':{
                                            'color':'#b6b6b6'
                                        }
                                    },
                                    'axisTick':{
                                        'show':false
                                    }
                                }],
                                'yAxis' : [
                                    {
                                        'type':'value',
                                        'max': 200,
                                        'min': 0,
                                        'axisLabel':{
                                            'intreval':0,
                                            'textStyle':{
                                                'color':'black',
                                                'fontSize':'16',
                                                'shadowOffset':-5
                                            }
                                        },
                                        'splitLine' : {
                                            'show' : false
                                        },
                                        'axisLabel' : {
                                            formatter: function(){
                                                return "";
                                            }
                                        },
                                        'axisLine':{
                                            'lineStyle':{
                                                'color':'#b6b6b6'
                                            }
                                        },
                                        'axisTick':{
                                            'show':false
                                        }
                                    },
                                    {
                                        'type':'value',
                                        'max': 200,
                                        'min': 0,
                                        'splitLine' : {
                                            'show' : false
                                        },
                                        'show':false,
                                        'axisLabel':{
                                            'intreval':0,
                                            'textStyle':{
                                                'color':'black',
                                                'fontSize':'16',
                                                'shadowOffset':-5
                                            }
                                        },
                                        'axisLabel' : {
                                            formatter: function(){
                                                return "";
                                            }
                                        },
                                        'axisLine':{
                                            'lineStyle':{
                                                'color':'#b6b6b6'
                                            }
                                        },
                                        'axisTick':{
                                            'show':false
                                        }
                                    }
                                ],
                                'series' : [
                                    {
                                        'name':'收缩压',
                                        'type':'line',
                                        'data': that.BpInfo.firstjson,
                                        'itemStyle':{
                                            'normal':{
                                                'color':'#00d2cb',
                                                'lineStyle':{
                                                    'color':'#00d2cb'
                                                }
                                            }
                                        },
                                        'symbolSize': function (value){
                                            return Math.round(value[2]/10) + 2;
                                        },
                                        'markLine':{
                                            'symbol' : 'none',
                                            'symbolSize' : [4, 2],
                                            'itemStyle' : {
                                                'normal': {
                                                    'label':{
                                                        'position':'left',
                                                        'textStyle':{'color':'black'}
                                                    }
                                                }
                                            },
                                            'data':[
                                                {
                                                    'yAxis':140,
                                                    'name':'140',
                                                    'itemStyle':{
                                                        'normal':{
                                                            'color':'#feacb0'
                                                        }
                                                    }
                                                },
                                                {
                                                    'yAxis':160,
                                                    'name':'160',
                                                    'itemStyle':{
                                                        'normal':{
                                                            'color':'#fd5962'
                                                        }
                                                    }
                                                },
                                                {
                                                    'yAxis':180,
                                                    'name':'180',
                                                    'itemStyle':{
                                                        'normal':{
                                                            'color':'red'
                                                        }
                                                    }
                                                }
                                            ]
                                        },
                                        'symbol':'circle',
                                        'symbolSize':16
                                    },
                                    {
                                        'name':'舒张压',
                                        'type':'line',
                                        'data': that.BpInfo.secondjson,
                                        'symbol':'circle',
                                        'symbolSize':18,
                                        'itemStyle':{
                                            'normal':{
                                                'color':'#3a85ff',
                                                'lineStyle':{
                                                    'color':'#3a85ff'
                                                }
                                            }
                                        },
                                        'markLine':{
                                            'symbol' : 'none',
                                            'symbolSize' : [4, 2],
                                            'itemStyle' : {
                                                'normal': {
                                                    'label':{
                                                        'position':'left',
                                                        'textStyle':{'color':'black'}
                                                    }
                                                }
                                            },
                                            'data':[
                                                {
                                                    'yAxis':60,
                                                    'name':'60',
                                                    'itemStyle':{
                                                        'normal':{
                                                            'color':'#feacb0'
                                                        }
                                                    }
                                                },
                                                {
                                                    'yAxis':90,
                                                    'name':'90',
                                                    'itemStyle':{
                                                        'normal':{
                                                            'color':'#fd5962'
                                                        }
                                                    }
                                                },
                                                {
                                                    'yAxis':110,
                                                    'name':'110',
                                                    'itemStyle':{
                                                        'normal':{
                                                            'color':'#red'
                                                        }
                                                    }
                                                }
                                            ]
                                        },
                                        'symbol':'circle',
                                        'symbolSize':16
                                    }
                                ]
                            }
                            myChart.setOption(options)
                            window.addEventListener('resize',function(){
                                myChart.resize()
                            })
                        }
                    }
                })
                // 获取当前点击是新增还是修改
                that.way = href.split('&')[1].split('=')[1];
                if( that.way == '' ){
                    // 获取上一次的数据
                    $.ajax({
                        url:"${URL_PPPATIENTBASE_PATIENTDATA}",
                        type:'get',
                        dataType: "json",
                        data:{
                            idCard:that.idCard
                        },
                        success: function(data) {
                            if( data.data != null ){
                                that.bpDate.bloodFat = data.data.bloodFat;
                                for( let key in data.data ){
                                    if( data.data[key] == null ){
                                        data.data[key] = ''
                                    }
                                }
                                that.bpDate.highCholesterol = data.data.highCholesterol;
                                that.bpDate.cholesterol = data.data.cholesterol;
                                that.bpDate.lowCholesterol = data.data.lowCholesterol;
                                that.bpDate.bloodSugar = data.data.bloodSugar;
                                that.bpDate.lowPressure = data.data.lowPressure;
                                that.bpDate.highPressure = data.data.highPressure;
                                that.bpDate.triglyceride = data.data.triglyceride;
                                that.bpDate.bmi = data.data.bmi;
                                that.bpDate.waist = data.data.waist;
                                that.bpDate.weight = data.data.weight;
                                that.bpDate.height = data.data.height;
                                that.bpDate.heartRate = data.data.heartRate
                            }
                        }
                    })
                }
                // 获取病人基本信息
                $.ajax({
                    url:"${URL_PATIENT_PATIENTINFO}",
                    type:'post',
                    dataType: "json",
                    data:{
                        idCard:that.idCard
                    },
                    success: function(data) {
                        that.infor = data.data;
                        that.id=that.infor.id;
                        var href = that.infor.diseasesType
                        that.infor.diseasesType = Type(that.infor.diseasesType)
                        that.diseasesType = that.infor.diseasesType
                        that.initTable()
                    }
                })
                // 初始化获取随访信息
                $.ajax({
                    url:"${URL_ACCOMPANY_BPData}",
                    type:'post',
                    dataType: "json",
                    data:{
                        id:that.way
                    },
                    success: function(data) {
                        if( data.data != null ){
                            that.bpDate = data.data
                            var accompanyType = $('#accompanyType option')
                            that.accompanyTime = that.bpDate.accompanyTime.slice(0,10)
                            that.nextAccompanyTime = that.bpDate.nextAccompanyTime.slice(0,10)
                            // 随访方式
                            for( var a = 0; a < accompanyType.length; a++ ){
                                if( accompanyType[a].value == that.bpDate.accompanyType ){
                                    accompanyType[a].selected = true
                                }
                            }
                            // 病症选择
                            var ills = $('.ill1 input')
                            var arr = that.bpDate.symptom.split(',')
                            for( var a = 0; a < ills.length; a++ ){
                                for( var  i = 0; i < arr.length; i++  ){
                                    if( arr[i] == a+1 ){
                                        ills[a].checked = true
                                    }
                                }
                            }
                            // 摄盐程度
                            var salt = $('.salts select option')
                            for( var a = 0; a < salt.length; a++ ){
                                if( salt[a].value == that.bpDate.salt ){
                                    salt[a].selected = true
                                }
                            }
                           // 摄盐指导
                            var saltGuide = $('.saltGuide select option')
                            for( var a = 0; a < saltGuide.length; a++ ){
                                if( saltGuide[a].value == that.bpDate.saltGuide ){
                                    saltGuide[a].selected = true
                                }
                            }
                            // 心里调整
                            var psychology = $('#psychology option')
                            for( var a = 0; a < psychology.length; a++ ){
                                if( psychology[a].value == that.bpDate.psychology ){
                                    psychology[a].selected = true
                                }
                            }
                            // 遵医行为
                            var observe = $('#observe option')
                            for( var a = 0; a < observe.length; a++ ){
                                if( observe[a].value == that.bpDate.observe ){
                                    observe[a].selected = true
                                }
                            }
                            // 随访分类
                            var classify = $('#accompanyClassify option')
                            for( var a = 0; a < classify.length; a++ ){
                                if( classify[a].value == that.bpDate.classify ){
                                    classify[a].selected = true
                                }
                            }
                        }else{
                          // 初始化显示时间 随访时间
                          // var date1 = new Date();
                          // var date2 = new Date(date1);
                          // var date = date1.format('yyyy-MM-dd');
                          // that.accompanyTime = date
                          // date2.setDate(date1.getDate() + 90);
                          // var nexttime = date2.format('yyyy-MM-dd');
                          // // var nexttime = date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + date2.getDate();
                          // that.nextAccompanyTime = nexttime;

                          // 初始化显示时间 随访时间
                            var date = new Date().format('yyyy-MM-dd');
                            that.accompanyTime = date;
                            // 获取年份
                            var year = date.slice(0,4)
                            // 获取月份
                            var month = date.slice(5,7)
                            if( parseInt(month) + 3 > 12 ){
                                month = parseInt(month) + 3 -12
                                year = parseInt(year) + 1
                            }else{
                                month = parseInt(month) + 3
                            }
                            if( String(month).length <= 1 ){
                                month = '0' + month
                            }
                            // debugger
                            // 获取日期
                            var day = date.slice(8,10);

                            if( parseInt(month) === 2 ){
                                if( parseInt(day) > 28 ){
                                  if (((year % 4)==0) && ((year % 100)!=0) || ((year % 400)==0)) {
                                    day = '29'
                                  }else{
                                    day = '28'
                                }
                              }
                            }else if( parseInt(month) === 4 || parseInt(month) === 6 || parseInt(month) === 9 || parseInt(month) === 11 ){
                                if( parseInt(day) > 30 ){
                                    day = '30';
                                }
                            }
                            var time = year + '-' + month + '-' + day
                            that.nextAccompanyTime = time
                            // that.nextAccompanyTime
                        }
                    }
                })
            }
        })
        $('#beginDate').bind('input propertychange',function(){
        })
        $(function(){
            initLayDate('#beginDate');
            initLayDate('#nextDate')
        })
    </script>
</body>
</html>
